import request from '@/utils/request.js'
import qs from 'qs'

// 获取实验报告
export const repGetReportService = () => {
    return request.get('/rep/get/report')
}

// 新增实验报告
export const repPostReportService = (data) => {
    return request.post('/rep/post/report', data)
}

// 修改实验报告
export const repUpdateReportService = (obj) => {
    return request.post('/rep/update/report', obj)
}

// 教师获取实验报告
export const repGetReportTeacherService = (sub) => {
    return request.post('/rep/get/report/teacher', { subject: sub })
}

// 删除实验报告
export const repDelReportService = (id) => {
    return request.post('/rep/del/report', { id })
}

// 管理员获取实验报告
export const reqGerAllReportService = () => {
    return request.get('/rep/allReport')
}

// 成绩构成
export const reqGerGradeReService = () => {
    return request.get('/rep/geadeResult')
}

//新增成绩构成
export const addGradeReService = (data) => {
    return request.post('/rep/adddeResult', data)
}

//修改成绩构成
export const aupdateGradeReService = (data) => {
    return request.post('/rep/updateGradeResult', data)
}

//删除成绩构成
export const delGradeReService = (data) => {
    return request.post('/rep/delGradeResult', data)
}

//新增实验项目
export const addExperService = (data) => {
    return request.post('/rep/addExpre', data)
}

// 指定用户获取项目
export const getExperOneService = () => {
    return request.get('/rep/getExpre')
}

//删除使验项目
export const delExperService = (data) => {
    return request.post('/rep/delExpre', data)
}

// 学生根据科目获取实验项目
export const getSubExperService = (data) => {
    console.log(data);
    return request.post('/rep/getSubExper', data)
}

// 获取项目
export const getExperAllOneService = () => {
    return request.get('/rep/getExpreAll')
}

// 修改项目标志
export const updateExperFlagService = (data) => {
    return request.post('/rep/updateFlag', data)
}